package vip.liux.backend.domain.models.shop.address;

import jakarta.persistence.Column;
import jakarta.persistence.Enumerated;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import vip.liux.backend.domain.shared.shop.AreaLevel;
import vip.liux.domain.entities.Entity;

@Getter
@Setter
@jakarta.persistence.Entity
@Table(name = "shop_region")
public class Region extends Entity<Long> {

    /**
     * 编码
     */
    @Column(name = "code", length = 64)
    private String code;

    /**
     * 名称
     */
    @Column(name = "name", length = 128)
    private String name;

    /**
     * 父级
     */
    @Column(name = "parent_id")
    private Long parentId;

    /**
     * 级别
     */
    @Column(name = "level")
    @Enumerated(jakarta.persistence.EnumType.STRING)
    private AreaLevel level;
}
